Integrand size = 19, antiderivative size = 34 \[ \int \tan (e+f x) \left (a+b \tan ^2(e+f x)\right ) \, dx=-\frac {(a-b) \log (\cos (e+f x))}{f}+\frac {b \tan ^2(e+f x)}{2 f} \]
[Out]
Time = 0.03 (sec) , antiderivative size = 34, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.105, Rules used = {3712, 3556} \[ \int \tan (e+f x) \left (a+b \tan ^2(e+f x)\right ) \, dx=\frac {b \tan ^2(e+f x)}{2 f}-\frac {(a-b) \log (\cos (e+f x))}{f} \]
[In]
[Out]
Rule 3556
Rule 3712
Rubi steps \begin{align*} \text {integral}& = \frac {b \tan ^2(e+f x)}{2 f}+(a-b) \int \tan (e+f x) \, dx \\ & = -\frac {(a-b) \log (\cos (e+f x))}{f}+\frac {b \tan ^2(e+f x)}{2 f} \\ \end{align*}
Time = 0.08 (sec) , antiderivative size = 40, normalized size of antiderivative = 1.18 \[ \int \tan (e+f x) \left (a+b \tan ^2(e+f x)\right ) \, dx=-\frac {a \log (\cos (e+f x))}{f}+\frac {b \left (2 \log (\cos (e+f x))+\tan ^2(e+f x)\right )}{2 f} \]
[In]
[Out]
Time = 0.04 (sec) , antiderivative size = 35, normalized size of antiderivative = 1.03
method | result | size |
derivativedivides | \(\frac {\frac {b \tan \left (f x +e \right )^{2}}{2}+\frac {\left (a -b \right ) \ln \left (1+\tan \left (f x +e \right )^{2}\right )}{2}}{f}\) | \(35\) |
default | \(\frac {\frac {b \tan \left (f x +e \right )^{2}}{2}+\frac {\left (a -b \right ) \ln \left (1+\tan \left (f x +e \right )^{2}\right )}{2}}{f}\) | \(35\) |
norman | \(\frac {b \tan \left (f x +e \right )^{2}}{2 f}+\frac {\left (a -b \right ) \ln \left (1+\tan \left (f x +e \right )^{2}\right )}{2 f}\) | \(37\) |
parallelrisch | \(\frac {b \tan \left (f x +e \right )^{2}+\ln \left (1+\tan \left (f x +e \right )^{2}\right ) a -\ln \left (1+\tan \left (f x +e \right )^{2}\right ) b}{2 f}\) | \(44\) |
parts | \(\frac {b \left (\frac {\tan \left (f x +e \right )^{2}}{2}-\frac {\ln \left (1+\tan \left (f x +e \right )^{2}\right )}{2}\right )}{f}+\frac {a \ln \left (1+\tan \left (f x +e \right )^{2}\right )}{2 f}\) | \(48\) |
risch | \(i x a -i x b +\frac {2 i a e}{f}-\frac {2 i b e}{f}+\frac {2 b \,{\mathrm e}^{2 i \left (f x +e \right )}}{f \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )^{2}}-\frac {\ln \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right ) a}{f}+\frac {\ln \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right ) b}{f}\) | \(91\) |
[In]
[Out]
none
Time = 0.30 (sec) , antiderivative size = 36, normalized size of antiderivative = 1.06 \[ \int \tan (e+f x) \left (a+b \tan ^2(e+f x)\right ) \, dx=\frac {b \tan \left (f x + e\right )^{2} - {\left (a - b\right )} \log \left (\frac {1}{\tan \left (f x + e\right )^{2} + 1}\right )}{2 \, f} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 60 vs. \(2 (26) = 52\).
Time = 0.09 (sec) , antiderivative size = 60, normalized size of antiderivative = 1.76 \[ \int \tan (e+f x) \left (a+b \tan ^2(e+f x)\right ) \, dx=\begin {cases} \frac {a \log {\left (\tan ^{2}{\left (e + f x \right )} + 1 \right )}}{2 f} - \frac {b \log {\left (\tan ^{2}{\left (e + f x \right )} + 1 \right )}}{2 f} + \frac {b \tan ^{2}{\left (e + f x \right )}}{2 f} & \text {for}\: f \neq 0 \\x \left (a + b \tan ^{2}{\left (e \right )}\right ) \tan {\left (e \right )} & \text {otherwise} \end {cases} \]
[In]
[Out]
none
Time = 0.24 (sec) , antiderivative size = 37, normalized size of antiderivative = 1.09 \[ \int \tan (e+f x) \left (a+b \tan ^2(e+f x)\right ) \, dx=-\frac {{\left (a - b\right )} \log \left (\sin \left (f x + e\right )^{2} - 1\right ) + \frac {b}{\sin \left (f x + e\right )^{2} - 1}}{2 \, f} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 402 vs. \(2 (32) = 64\).
Time = 0.57 (sec) , antiderivative size = 402, normalized size of antiderivative = 11.82 \[ \int \tan (e+f x) \left (a+b \tan ^2(e+f x)\right ) \, dx=-\frac {a \log \left (\frac {4 \, {\left (\tan \left (f x\right )^{2} \tan \left (e\right )^{2} - 2 \, \tan \left (f x\right ) \tan \left (e\right ) + 1\right )}}{\tan \left (f x\right )^{2} \tan \left (e\right )^{2} + \tan \left (f x\right )^{2} + \tan \left (e\right )^{2} + 1}\right ) \tan \left (f x\right )^{2} \tan \left (e\right )^{2} - b \log \left (\frac {4 \, {\left (\tan \left (f x\right )^{2} \tan \left (e\right )^{2} - 2 \, \tan \left (f x\right ) \tan \left (e\right ) + 1\right )}}{\tan \left (f x\right )^{2} \tan \left (e\right )^{2} + \tan \left (f x\right )^{2} + \tan \left (e\right )^{2} + 1}\right ) \tan \left (f x\right )^{2} \tan \left (e\right )^{2} - b \tan \left (f x\right )^{2} \tan \left (e\right )^{2} - 2 \, a \log \left (\frac {4 \, {\left (\tan \left (f x\right )^{2} \tan \left (e\right )^{2} - 2 \, \tan \left (f x\right ) \tan \left (e\right ) + 1\right )}}{\tan \left (f x\right )^{2} \tan \left (e\right )^{2} + \tan \left (f x\right )^{2} + \tan \left (e\right )^{2} + 1}\right ) \tan \left (f x\right ) \tan \left (e\right ) + 2 \, b \log \left (\frac {4 \, {\left (\tan \left (f x\right )^{2} \tan \left (e\right )^{2} - 2 \, \tan \left (f x\right ) \tan \left (e\right ) + 1\right )}}{\tan \left (f x\right )^{2} \tan \left (e\right )^{2} + \tan \left (f x\right )^{2} + \tan \left (e\right )^{2} + 1}\right ) \tan \left (f x\right ) \tan \left (e\right ) - b \tan \left (f x\right )^{2} - b \tan \left (e\right )^{2} + a \log \left (\frac {4 \, {\left (\tan \left (f x\right )^{2} \tan \left (e\right )^{2} - 2 \, \tan \left (f x\right ) \tan \left (e\right ) + 1\right )}}{\tan \left (f x\right )^{2} \tan \left (e\right )^{2} + \tan \left (f x\right )^{2} + \tan \left (e\right )^{2} + 1}\right ) - b \log \left (\frac {4 \, {\left (\tan \left (f x\right )^{2} \tan \left (e\right )^{2} - 2 \, \tan \left (f x\right ) \tan \left (e\right ) + 1\right )}}{\tan \left (f x\right )^{2} \tan \left (e\right )^{2} + \tan \left (f x\right )^{2} + \tan \left (e\right )^{2} + 1}\right ) - b}{2 \, {\left (f \tan \left (f x\right )^{2} \tan \left (e\right )^{2} - 2 \, f \tan \left (f x\right ) \tan \left (e\right ) + f\right )}} \]
[In]
[Out]
Time = 11.67 (sec) , antiderivative size = 37, normalized size of antiderivative = 1.09 \[ \int \tan (e+f x) \left (a+b \tan ^2(e+f x)\right ) \, dx=\frac {b\,{\mathrm {tan}\left (e+f\,x\right )}^2}{2\,f}+\frac {\ln \left ({\mathrm {tan}\left (e+f\,x\right )}^2+1\right )\,\left (\frac {a}{2}-\frac {b}{2}\right )}{f} \]
[In]
[Out]